package org.veridiandynamics.server.domain;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;

/**
 * Contains information pertaining to a service that is billable; stores name and cost.
 *
 */
public class ServicesBillable implements PersistObject, Serializable
{	

	private long id;
	private String service;
	private float cost;
	
	private static final long serialVersionUID = 100L;
	
	/**
	 * Constructor with name of service and cost of service.
	 * 
	 * @param service
	 * @param cost
	 */
	public ServicesBillable(String service, float cost)
	{
		this.service = service;
		this.cost = cost;
	}
	
	/**
	 * Default constructor.
	 */
	public ServicesBillable(){}
	
	/**
	 * Returns service.
	 * @return
	 */
	public String getService() {
		return service;
	}

	/**
	 * Sets service.
	 * 
	 * @param service
	 */
	public void setService(String service) {
		this.service = service;
	}

	/**
	 * Returns cost.
	 * @return
	 */
	public float getCost() {
		return cost;
	}

	/**
	 * Sets cost.
	 * @param cost
	 */
	public void setCost(float cost) {
		this.cost = cost;
	}

	/**
	 * Returns ID.
	 * @return
	 */
	public long getId() {
		return id;
	}

	/**
	 * Sets ID.
	 * @param id
	 */
	public void setId(long id) {
		this.id = id;
	}
	

	
	/**
	 * Writes object.
	 * 
	 * @param outputStream
	 * @throws IOException
	 */
	private void writeObject(ObjectOutputStream outputStream) throws IOException {
		outputStream.defaultWriteObject();
	}
	
	/**
	 * Reads object.
	 * 
	 * @param inputStream
	 * @throws ClassNotFoundException
	 * @throws IOException
	 */
	private void readObject(ObjectInputStream inputStream) throws ClassNotFoundException, IOException {
		inputStream.defaultReadObject();
	}
}
